//TIP 要<b>运行</b>代码，请按 <shortcut actionId="Run"/> 或
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
import java.util.*;

public class Main {
    public static void main(String[] args) {
EmployeeMangementSystem ems=new EmployeeMangementSystem();
ems.addEmployee(1);
ems.displayEmployeesByPosition();
    }
}
class Manager extends Employee{
    public Manager(int employeeId, String name, String position, int leaveDay, double basicSalary){
        super(employeeId,name,position,leaveDay,basicSalary);
    }
    public  double calculateSalary(){
        double salary=0.0;
        salary=getBasicSalary()+getBasicSalary()*0.5+200-this.getLeaveDay()*(getBasicSalary()/30);
        return  salary;
    }
}
class Director extends Employee{
    public Director(int employeeId, String name, String position, int leaveDay, double basicSalary){
        super(employeeId,name,position,leaveDay,basicSalary);
    }
    public double calculateSalary(){
        double salary=0.0;
        salary=getBasicSalary()+getBasicSalary()*0.8+2000-this.getLeaveDay()*(getBasicSalary()/30);
        return  salary;
    }
}
class Staff extends Employee{
    public  Staff(int employeeId, String name, String position, int leaveDay, double basicSalary){
        super(employeeId,name,position,leaveDay,basicSalary);
    }
    public  double calculateSalary(){
        double salary=0.0;
        salary=getBasicSalary()+getBasicSalary()*0.1+1000-this.getLeaveDay()*(getBasicSalary()/30);
        return  salary;
    }
}
class EmployeeMangementSystem{
    Scanner scanner=new Scanner(System.in);
    private Employee el;
    public static int employeeCount=0;
    public EmployeeMangementSystem(){
        employeeCount++;
    }
    public  void addEmployee(int employeeCount){
        System.out.println("请输入员工姓名");
        String name=scanner.nextLine();
        System.out.println("请输入员工职务");
        String position=scanner.nextLine();
        System.out.println("请输入员工请假天数");
        int leaveDay=scanner.nextInt();
        System.out.println("请输入基本工资");
        double basicSalary=scanner.nextDouble();
        scanner.close();
        if(position.equals("经理")){
            el=new Manager(employeeCount,name,position,leaveDay,basicSalary);
        }else if(position.equals("董事")){
            el=new Director(employeeCount,name,position,leaveDay,basicSalary);
        }else{
            el=new Staff(employeeCount,name,position,leaveDay,basicSalary);
        }
        System.out.println("信息已录入");
        return;
    }
    public void displayEmployeesByPosition(){
        System.out.println("----------员工信息如下----------");
        System.out.println("员工ID: "+el.getEmployeeId());
        System.out.println("员工姓名： "+el.getName());
        System.out.println("员工职务： "+el.getPosition());
        System.out.println("请假天数： "+el.getLeaveDay());
        System.out.println("基本工资： "+el.getBasicSalary());
        System.out.println("薪资： "+el.calculateSalary());
        System.out.println("------------------------------");
    }
}
 class Employee{
    private int employeeId;
    private String name;
    private String position;
    private int leaveDay;
    private  double basicSalary;

     public int getEmployeeId() {
         return employeeId;
     }

     public void setEmployeeId(int employeeId) {
         this.employeeId = employeeId;
     }

     public double getBasicSalary() {
         return basicSalary;
     }

     public void setBasicSalary(double basicSalary) {
         this.basicSalary = basicSalary;
     }

     public String getName() {
         return name;
     }

     public void setName(String name) {
         this.name = name;
     }

     public String getPosition() {
         return position;
     }

     public void setPosition(String position) {
         this.position = position;
     }

     public int getLeaveDay() {
         return leaveDay;
     }

     public void setLeaveDay(int leaveDay) {
         this.leaveDay = leaveDay;
     }

     public Employee(int employeeId, String name, String position, int leaveDay, double basicSalary){
        this.basicSalary=basicSalary;
        this.employeeId=employeeId;
        this.leaveDay=leaveDay;
        this.name=name;
        this.position=position;
    }
    public double calculateSalary(){
         return  0;
    }
}